/*
 * @(#)TextSimilarity.java	1.0 01/01/05
 *
 * Copyright 2007 Fabio Gasparetti. All rights reserved.
 */
package org.tabularium.text;

/**
 * Basic functionalities to draw a similarity measure between to texts.
 * <p>
 * Implementations may simply compare tokens or use complex vocabulary to measure
 * semantic similarities. 
 * 
 * @author  Fabio Gasparetti
 * @version 1.0, 01/01/05
 */
public interface TextSimilarity {

	/**
	 * Returns a value in the [0, 1] range that represents how much two texts are similar.
	 *
	 * @param text1
	 * @param text2
	 * @return
	 */
	double similarity(String text1, String text2);

	/**
	 * Returns a value in the [0, 1] range that represents how much two texts are similar.
	 *
	 * @param text1
	 * @param text2
	 * @return
	 */
	double similarity(TermWeightVector v1, TermWeightVector v2);
}
